projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b3b4476
)
* gtkutil.c (get_utf8_string): Remove redundant assignment.
author
Paul Eggert
<eggert@cs.ucla.edu>
Mon, 25 Jun 2012 07:54:45 +0000
(
00:54
-0700)
committer
Paul Eggert
<eggert@cs.ucla.edu>
Mon, 25 Jun 2012 07:54:45 +0000
(
00:54
-0700)
sprintf already null-terminates its output.
src/ChangeLog
patch
|
blob
|
history
src/gtkutil.c
patch
|
blob
|
history
diff --git
a/src/ChangeLog
b/src/ChangeLog
index 02dc8d4203afc7f75590592b055335fbe275c253..95c938d7a6867d39087f6b5b48a445787490e8d2 100644
(file)
--- a/
src/ChangeLog
+++ b/
src/ChangeLog
@@
-1,5
+1,8
@@
2012-06-25 Paul Eggert <eggert@cs.ucla.edu>
+ * gtkutil.c (get_utf8_string): Remove redundant assignment.
+ sprintf already null-terminates its output.
+
* xfns.c (x_window): Remove redundant cast.
2012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
diff --git
a/src/gtkutil.c
b/src/gtkutil.c
index 51c56e49540ac51b16eb802ac6e5a25dcffd3e5e..6105d139d0ed07a94db196a3a988bc6493353e89 100644
(file)
--- a/
src/gtkutil.c
+++ b/
src/gtkutil.c
@@
-525,7
+525,6
@@
get_utf8_string (const char *str)
{
strncpy (up, (char *)p, bytes_written);
sprintf (up + bytes_written, "\\%03o", p[bytes_written]);
- up[bytes_written+4] = '\0';
up += bytes_written+4;
p += bytes_written+1;
g_error_free (err);